<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
    </head>
    <body>
        <script>
function openWindow(){
    window.open("http://www.baidu.com","百度一下","height=700px,width=1000px,left=300px");
}
function closeWindow(){
    window.close();
}

</script>
</body>
<button onclick = "closeWindow()">关闭当前窗口</button>
<button onclick = "openWindow()">打开一个新的浏览器窗口</button>
</html>